home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / pascal / tppop16.zip / REMOVE.PAS < prev    next >
Pascal/Delphi Source File  |  1988-09-28  |  702b  |  22 lines

  1. {$R-,S-,I+,D+,T+,F-,V-,B-,N-,L+ }
  2. {$M 1024,5120,5120}
  3. Program RemoveTSR;
  4.  
  5. Uses Unhook;
  6.  
  7. Var
  8.   Signature : Byte;
  9.   Result    : Integer;
  10.  
  11. Begin
  12.   Val(ParamStr(1),Signature,Result);   { convert parameter to number }
  13.   If Result <> 0 Then Halt(3);         { halt w/error if bad }
  14.   If Installed(Signature)              { is it installed?    }
  15.     Then Begin                         { yes.                }
  16.       If OkToRemove(Signature)         { can it be unloaded? }
  17.         Then RemoveProgram(Signature)  { yes. remove it.     }
  18.       Else Halt(2)                     { can't be safely removed }
  19.     End
  20.   Else Halt(1);                        { program not found in memory. }
  21. End.
  22.